export class RenderObject {
    constructor(options) {
        this.drawInfo = options.drawInfo;
        this.attributes = options.attributes || [];
        this.uniforms = options.uniforms || [];
        this.samplers = options.samplers || [];
        this.program = options.program;
        this.node = options.node;
    }
}

export class RenderAttribute {
    constructor(options) {
        this.name = options.name;
        this.renderBuffer = options.renderBuffer;
        this.size = options.size || 4;
        this.type = options.type || 5126; //GL.FLOAT;
        this.normalized = options.normalized || false;
        this.stride = options.stride || 0;
        this.offset = options.offset || 0;
    }
}

export class RenderUniform {
    constructor(options) {
        this.name = options.name;
        this.value = options.value;
        this.length = options.length;
    }
}

export class RenderDrawInfo {
    constructor(options) {
        this.indexBuffer = options.indexBuffer;
        this.hasIndex = !!options.indexBuffer;
        this.mode = options.mode || 4; //GL.TRIANGLES;
        this.count = options.count;
        this.type = options.type || 5123; //GL.UNSIGNED_SHORT;
        this.offset = options.offset || 0;
        this.first = options.first || 0;
    }
}

export class RenderTexture {
    constructor(options) {
        this.texture = options.texture;
        this.complete = false;
    }
}

export class RenderSampler {
    constructor(options) {
        this.name = options.name;
        this.index = options.index || 0;
        this.renderTexture = options.renderTexture;
    }
}

export class RenderBuffer {
    constructor(options) {
        this.target = options.target;
        this.buffer = options.buffer;
        this.usage = options.usage;
    }
}